<!DOCTYPE html>
<html>
<head>
    <title>个人信息</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="stylesheet" href="../lib/weui.min.css">
    <link rel="stylesheet" href="../css/jquery-weui.css">
    <link rel="stylesheet" href="../css/base.css">
    <link rel="stylesheet" href="../css/my.css">
</head>
<body>
<div class="xyg-top">
    <div class="weui-cell">
        <div class="weui-cell__hd" style="position: relative;margin-right: 10px;">
            <img src="http://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83erwNuhJ4lD3jZpExY3JaKM7Sv4psaIh8ONSPiabSAr1G3aH9bib71IhPiaJ9zLLNGVgWRyHmkwl0enWw/132"
                 style="width: 70px;display: block;border-radius: 35px;">
        </div>
        <div class="weui-cell__bd">
            <p>云&nbsp;&nbsp;<span style="font-size: 14px; color:#ffed6b;"></span></p>
            <p style="font-size: 13px;">ID:12</p>
        </div>
    </div>
</div>
<div class="xyg-money">
    <div class="weui-cells__title margin-top-0">账号总余额（元）</div>
    <div class="weui-cells__title xyg-money-font3 margin-top-bottom-0">12</div>
    <div class="weui-cells__title border-top" style="padding-top: 0.37rem; margin-top: 0px;">
        <div class="weui-flex">
            <div class="weui-flex__item">
                <div class="placeholder xyg-money-font4">可提现金额&nbsp;&nbsp;
                    <span>￥10</span></div>
            </div>
            <div>
                <div class="placeholder">
                    <a href="javascript:tixian('${memberId}');"
                       class="weui-btn weui-btn_mini weui-btn_default margin-top-0">提现</a>&nbsp;&nbsp;
                </div>
            </div>
            <div>
                <div class="placeholder">
                    <a href="javascript:logList('${memberId}');"
                       class="weui-btn weui-btn_mini weui-btn_default margin-top-0">明细</a>&nbsp;&nbsp;
                </div>
            </div>
        </div>
    </div>
</div>
<div class="weui-cells">
    <a class="weui-cell weui-cell_access" href="javascript:goDetailList('')">
        <div class="weui-cell__bd">
            <p>订单管理</p>
        </div>
        <div class="weui-cell__ft"></div>
    </a>
    <a class="weui-cell weui-cell_access" href="javascript:void(0);">
        <div class="weui-cell__bd">
            <div class="weui-flex">
                <div class="weui-flex__item">
                    <div class="placeholder">
                        <div class="xyg_my_ddpic" onClick="goDetailList(1)">
                            <div class="xyg_my_ddpic_position">
                                <div class="xyg_my_ddpic_position_num1" style="display: none">
                                    <div id="nonpayNum"></div>
                                </div>
                                <img src="../images/icon_dzf.png"/>
                            </div>
                        </div>
                        <div class="xyg_my_ddtext" onClick="goDetailList(1)">待支付</div>
                    </div>
                </div>
                <div class="weui-flex__item">
                    <div class="placeholder">
                        <div class="xyg_my_ddpic" onClick="goDetailList(2)">
                            <div class="xyg_my_ddpic_position">
                                <div class="xyg_my_ddpic_position_num1" style="display: none">
                                    <div id="payNum"></div>
                                </div>
                                <img src="../images/icon_dfh.png"/>
                            </div>
                        </div>
                        <div class="xyg_my_ddtext" onClick="goDetailList(2)">待发货</div>
                    </div>
                </div>
                <div class="weui-flex__item">
                    <div class="placeholder">
                        <div class="xyg_my_ddpic" onClick="goDetailList(3)">
                            <div class="xyg_my_ddpic_position">
                                <div class="xyg_my_ddpic_position_num1" style="display: none">
                                    <div id="nonsendNum"></div>
                                </div>
                                <img src="../images/icon_dsh.png"/>
                            </div>
                        </div>
                        <div class="xyg_my_ddtext" onClick="goDetailList(3)">待收货</div>
                    </div>
                </div>
            </div>
        </div>
    </a>
    <a class="weui-cell weui-cell_access" href="javascript:;">
        <div class="weui-cell__bd">
            <div class="weui-flex">
                <div class="weui-flex__item">
                    <div class="placeholder">
                        <div class="xyg_my_ddpic" onClick="goDetailList(4)">
                            <img src="../images/icon_shjl.png"/></div>
                        <div class="xyg_my_ddtext" onClick="goDetailList(4)">售后记录</div>
                    </div>
                </div>
                <div class="weui-flex__item">
                    <div class="placeholder">
                        <div class="xyg_my_ddpic" onClick="goKeFu('${memberId}')">
                            <img src="../images/icon_kf.png"/></div>
                        <div class="xyg_my_ddtext" onClick="goKeFu('${memberId}')">客服中心</div>
                    </div>
                </div>
                <div class="weui-flex__item">
                    <div class="placeholder">
                        <div class="xyg_my_ddpic"></div>
                        <div class="xyg_my_ddtext"></div>
                    </div>
                </div>
            </div>
        </div>
    </a>
</div>
<div class="weui-cells">
    <a class="weui-cell weui-cell_access" href="javascript:goAddress();">
        <div class="weui-cell__bd">
            <p>我的地址</p>
        </div>
        <div class="weui-cell__ft"></div>
    </a>
    <a class="weui-cell weui-cell_access" href="javascript:coupon('${memberId}');;">
        <div class="weui-cell__bd">
            <p>我的优惠券</p>
        </div>
        <div class="weui-cell__ft">1张可用</div>
    </a>
</div>
<div class="xyg_bottom"></div>

<!--底部开始-->
<div class="xyg-product-footer" id="footNavShow">

</div>
<!--底部结束-->
</body>
<script src="../lib/jquery-2.1.4.js"></script>
<script src="../js/jquery-weui.js"></script>
<script src="../fonts/iconfont.js"></script>
<script src="../lib/handlebars.min.js"></script>
<script src="../js/config.js"></script>
<script src="../js/base.js"></script>
<script>
    $("#footNavShow").load("footnav.html");
    var memberId = getMemberId();
    // member信息
    $.get(baseURL + "api/member/info/" + memberId, "", function (res) {
        if (res.code == 0) {
            console.log(res);
        }
    }, "json");
    // 订单数
    $.get(baseURL + "api/order/num/" + memberId, "", function (res) {
        if (res.code == 0) {
            if (res.nonpay > 0) {
                $("#nonpayNum").parent().show();
                $("#nonpayNum").html(res.nonpay);
            }
            if (res.pay > 0) {
                $("#payNum").parent().show();
                $("#payNum").html(res.pay);
            }
            if (res.nonsend > 0) {
                $("#nonsendNum").parent().show();
                $("#nonsendNum").html(res.nonsend);
            }
        }
    }, "json");

    function goAddress() {
        window.location.href = "/mobile/view/address.html?memberId=" + memberId + "&type=1";
    }
    function goDetailList(status) {
        window.location.href = "/mobile/view/detailList.html?memberId=" + memberId + "&status=" + status;
    }
</script>
</html>

